﻿#region Copyright (c) 2011, thinktecture (http://www.thinktecture.com)

/*
   thinktecture.UIAnnotations was developed by Jörg Neumann.
   Copyright (c) 2011, thinktecture (http://www.thinktecture.com).
   All rights reserved, comes as-is and without any warranty. Use of this
   source file is governed by the license which is contained in LICENSE.TXT 
   in the distribution.
*/

#endregion

using System;
using System.Linq;
using System.Collections.Generic;

namespace Thinktecture.DataForm
{
    public sealed class DataFormSubSourceCollection : List<DataFormSubSource>
    {
        public DataFormSubSource this[string name]
        {
            get { return (from source in this where source.EntityPropertyName == name select source).FirstOrDefault(); }
        }
    }
}
